#!/usr/bin/python
# -*- coding: utf-8 -*-
# @version        : 1.0
# @Create Time    : 2024/9/6 11:11
# @File           : vendor
# @IDE            : PyCharm
# @desc           : 描述

from typing import Optional
from pydantic import BaseModel, ConfigDict
from core.data_types import DatetimeStr


class QARTask(BaseModel):
    purchase_order: str
    part_no: str
    part_name: str
    material_no: str

    product_type: Optional[str] = None
    part_type: Optional[str] = None
    flight: Optional[str] = None
    vendor: Optional[str] = None
    zpm_cpm: Optional[str] = None
    size: Optional[str] = None

    quantity_weight: Optional[str] = None

    create_user: Optional[str] = None
    update_user: Optional[str] = None


class QARTaskSimpleOut(QARTask):
    model_config = ConfigDict(from_attributes=True)

    id: int
    update_datetime: DatetimeStr
    create_datetime: DatetimeStr
